import VueRouter from 'vue-router'

import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MemberContainer.vue'
import cart from './components/tabbar/CartContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import newsList from './components/news/News.vue'
import newsInfo from './components/news/NewsInfo.vue'
import photoList from './components/photos/PhotoList.vue'
import photoInfo from './components/photos/PhotoInfo.vue'
import goodsList from './components/goods/GoodsList.vue'
import goodsInfo from './components/goods/GoodsInfo.vue'
import goodsDesc from './components/goods/GoodsDesc.vue'
import goodsComment from './components/goods/GoodsComment.vue'



var router = new VueRouter({
    routes: [
       {path: '/', redirect: '/home'},
       {path: '/home', component: home},
       {path: '/member', component: member},
       {path: '/cart', component: cart},
       {path: '/search', component: search},
       {path: '/home/news', component: newsList},
       {path: '/home/newsinfo/:id', component: newsInfo},
       {path: '/home/photolist', component: photoList},
       {path: '/home/photoinfo/:id', component: photoInfo},
       {path: '/home/goodslist', component: goodsList},
       {path: '/home/goodsinfo/:id', component: goodsInfo, name: 'goodsinfo'},
       {path: '/home/goodsdesc/:id', component: goodsDesc, name: 'goodsdesc'},
       {path: '/home/goodscomment/:id', component: goodsComment, name: 'goodscomment'}

    ],
    linkActiveClass: 'mui-active'   //覆盖默认的路由高亮的类(router-link-active)
})

export default router